package com.springboot.project.common.dao;

import com.springboot.project.common.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
  * 管理员表 Mapper 接口
 * </p>
 *
 * @author lby
 * @since 2018-03-24
 */
public interface UserDao extends com.baomidou.mybatisplus.mapper.BaseMapper<User> {

    User getUserByName(String userName);

    String getRoleNameById(int roleId);

    List<User> selectUser(Map<String,Object> map);

    int editUser(User user);

    int resetPassword(@Param("id")int id, @Param("password")String password);

    int count(Map<String, Object> map);

    int delByRoleId(@Param("roleid")int roleid);
}